package str;

/**
 * leet-code(511) 学生出勤记录 I
 *
 * @author Ringo
 * @date 2021/8/18 21:05
 */
public class CheckRecord {

    public static void main(String[] args) {
        String s = "PPALLL";
        System.out.println(checkRecord(s));
    }

    public static boolean checkRecord(String s) {
        return s.indexOf('A') == s.lastIndexOf('A') && !s.contains("LLL");
    }

}
